package com.tiancheng.trade.settlement.service.settlement;

import com.tiancheng.trade.commom.core.data.PageInfo;
import com.tiancheng.trade.settlement.exception.BusinessException;
import com.tiancheng.trade.settlement.model.settlement.MerchantContract;
import com.tiancheng.trade.settlement.vo.settlement.merchantcontract.GetMerchantContractVO;
import com.tiancheng.trade.settlement.vo.settlement.merchantcontract.GetPageMerchantContractVO;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface IMerchantContractService {

    /**
     * 根据ID查询
     *
     * @param id
     * @return
     */
    MerchantContract findById(Long id);

    /**
     * 商户信息查询列表
     *
     * @param merchantVO
     * @return
     */
    PageInfo<MerchantContract> getMerchantPage(GetPageMerchantContractVO merchantVO);

    List<MerchantContract> findList(GetMerchantContractVO merchantVO);

    /**
     * 按商户编号信息查询合同信息
     *
     * @param listStr
     * @return
     */
    List<MerchantContract> findContractList(List<String> listStr);

    /**
     * 按商户编号信息查询有效合同信息
     *
     * @param listStr
     * @return
     */
    List<MerchantContract> findEffectiveContract(List<String> listStr, String date);

    int add(MerchantContract merchant) throws BusinessException;

    int update(MerchantContract merchant) throws BusinessException;

    int remove(Long id);

    /**
     * 按时间查询合同
     *
     * @param date
     * @return
     */
    List<MerchantContract> findContractByDate(List<String> listStr, String date);

    /**
     * 按时间查询合同
     *
     * @param date
     * @return
     */
    List<MerchantContract> findContractByInDate(List<String> listStr, String date);

    /**
     * 商户合同信息导出
     *
     * @param merchantVO
     * @param request
     * @param response
     * @throws IOException
     */
    void export(GetPageMerchantContractVO merchantVO, HttpServletRequest request, HttpServletResponse response) throws IOException;

}
